from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin

from django.views.generic.simple import direct_to_template
admin.autodiscover()
from blog.views import *
from django.conf import settings

urlpatterns = patterns('',
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^$','pages.views.MainHomePage'),
#    (r'^$' , direct_to_template, {'template': 'index.html'}),
    
    (r'^tinymce/', include('tinymce.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^blog/$',archive),
    (r'^beers/$', 'beer.views.BeersAll'),
    (r'^beers/(?P<beerslug>.*)/$', 'beer.views.SpecificBeer'),
    (r'^brewerys/(?P<breweryslug>.*)/$', 'beer.views.SpecificBrewery'),
    (r'^site_media/(?P<path>.*)/$','django.views.static.serve',{'document_root':settings.STATIC_ROOT}),
    (r'^medias/(?P<path>.*)/$','django.views.static.serve',{'document_root':settings.MEDIA_ROOT}),
    (r'^register/$', 'drinker.views.DrinkerRegistration'),
)
